STEP 2: Now that our game is running, let's get started by creating our first function that will read a CSV file.

  • This function will need one parameter: the name of the file from which we're pulling our data.
  • In , drag in Define Function with Docstring above where it says: MAIN FUNCTION.
  • Rename my_function to get_high_scores and type file_name inside the ( ).
  • Finally, change your docstring to the following: """ Returns data from CSV as list of lists """

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)